import App from './App'

// #ifndef VUE3

import Vue from 'vue'
import httpApi from './common/httpLbApi'
import HttpRequest from './common/httpRequest'
import configs from './common/config.js'
import './uni.promisify.adaptor'
import uView from "uview-ui";
import TMap from "./common/qqmap-wx-jssdk.js"
import store from './store'
import './router/index.js'
import echarts from 'echarts';
import common from './common/common.js'
import aLoadMore from "@/components/loadMore/loadMore";


Vue.component("aLoadMore", aLoadMore);
Vue.prototype.$noMultipleClicks = common.noMultipleClicks;
Vue.prototype.$echarts = echarts;
Vue.prototype.$store = store
Vue.prototype.TMap = TMap


// Vue.prototype.updateTabBarBadge = function () {
//   this.$Request.post(this.$api.user.infimationStatictisc).then(res => {
//     if (res.code == 200) {
//       console.log("MAin.js")
//       if (res.data.count > 0) {
//         let count = JSON.stringify(res.data.count)
//         setTimeout(() => {
//           uni.setTabBarBadge({ //显示数字  
//             index: 3, //tabbar下标
//             text: count, //数字
//           })
//         }, 500)
//       }
//     }
//   })
// }
Vue.use(uView);
Vue.config.productionTip = false
App.mpType = 'app'
Vue.prototype.$api = httpApi
Vue.prototype.$Request = HttpRequest
Vue.prototype.$configs = configs
const app = new Vue({
  store,
  ...App
})

app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif